package com.ws.lv.service.impl;

import com.ws.lv.bean.Slideshow;
import com.ws.lv.mapper.SlideshowMapper;
import com.ws.lv.service.SlideshowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class SlideshowServiceImpl implements SlideshowService {
    @Autowired
    SlideshowMapper slideshowMapper;
    @Override
    public int insertSlideshow(Slideshow slideshow) {
        return slideshowMapper.insertSlideshow(slideshow);
    }

    @Override
    public List<Slideshow> selectSlideshows (Integer slideshow_state, String order) {
        return slideshowMapper.selectSlideshows(slideshow_state,order);
    }

    @Override
    public int updateStateDisplay(int slideshow_id) {
        return slideshowMapper.updateStateDisplay(slideshow_id);
    }

    @Override
    public int updateStateHide(int slideshow_id) {
        return slideshowMapper.updateStateHide(slideshow_id);
    }

    @Override
    public List<Slideshow> selectSlideshowByRouteId(ArrayList<Integer> slideshow_routeIds) {
        return slideshowMapper.selectSlideshowByRouteId(slideshow_routeIds);
    }

    @Override
    public int deleteSlideshows(ArrayList<Integer> slideshow_routeIds) {
        return slideshowMapper.deleteSlideshows(slideshow_routeIds);
    }

    @Override
    public Slideshow selectSlideshowByRoute_id(int route_id) {
        return slideshowMapper.selectSlideshowByRoute_id(route_id);
    }

    @Override
    public int updateSlideshow(Slideshow slideshow) {
        return slideshowMapper.updateSlideshow(slideshow);
    }

    @Override
    public int deleteSlideshow(int slideshow_id) {
        return slideshowMapper.deleteSlideshow(slideshow_id);
    }

    @Override
    public Slideshow selectSlideshowById(int slideshow_id) {
        return slideshowMapper.selectSlideshowById(slideshow_id);
    }

    @Override
    public int updateSlideshowById(Slideshow slideshow) {
        return slideshowMapper.updateSlideshowById(slideshow);
    }

}
